﻿<UserControl x:Class="ScreenCatcher.View.Controls.ClickedImage"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             xmlns:controls="clr-namespace:ScreenCatcher.View.Controls"
             mc:Ignorable="d">
    <Border>
        <Image Source="{Binding ImageSource, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type controls:ClickedImage}}}" Focusable="False"/>
        <Border.Style>
            <Style BasedOn="{StaticResource MainChromeBorder}" TargetType="{x:Type Border}">
                <Style.Triggers>
                    <Trigger Property="IsMouseOver" Value="True">
                        <Setter Property="BorderBrush" Value="{StaticResource MouseOverBrush}" />
                    </Trigger>
                    <DataTrigger Binding="{Binding IsPressed, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type controls:ClickedImage}}}" Value="True">
                        <Setter Property="BorderBrush" Value="{StaticResource ActiveBrush}" />
                    </DataTrigger>
                </Style.Triggers>
            </Style>
        </Border.Style>
    </Border>
</UserControl>